package qdu.edu.com.fushanf4.service.count.usertype.count;

import org.apache.hadoop.mapreduce.Job;
import qdu.edu.com.fushanf4.service.count.TextIntWritableCountReducer;
import qdu.edu.com.fushanf4.utils.ConfigurationUtil;
import qdu.edu.com.fushanf4.utils.DriverUtil;

import java.io.IOException;

public class CharacterOfProductDescriptionCountDriver extends DriverUtil {
    public static void main(String[] args) throws IOException {
        CharacterOfProductDescriptionCountDriver characterOfProductDescriptionCountDriver = new CharacterOfProductDescriptionCountDriver();
        characterOfProductDescriptionCountDriver.run(args);
    }

    @Override
    public Job runJob(String[] path) throws IOException {
        Job job = ConfigurationUtil.getJob();
        job.setMapperClass(CharacterOfProductDescriptionCountMapper.class);
        TextIntWritableCountReducer.setReduceOfAll(job);
        assert ConfigurationUtil.setPathAndRunJob(path, job);
        return job;
    }
}
